﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

public partial class Manage_Service_getdept4paper : ManagePageBase
{
    protected List<Exam.Core.Model.Student> list = new List<Exam.Core.Model.Student>();

    int deptid = 0;//部门ID

    protected void Page_Load(object sender, EventArgs e) {
        if (!string.IsNullOrEmpty(Request.QueryString["deptid"])) {
            deptid = int.Parse(Request.QueryString["deptid"].Trim());
        }
        if (!IsPostBack) {
            
            list = new Exam.Core.DAL.Student().getStudentListByDeptId(deptid);
            StringBuilder sb = new StringBuilder();
            foreach(Exam.Core.Model.Student obj in list){
                if (obj.StudentID.Trim() != "") {
                    sb.Append(obj.StudentID.Trim());
                    sb.Append(",");
                }
            }
            Response.Write(sb.ToString().Trim(',').Trim());
            Response.End();
        }
    }
}